home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
LANG
/
C
/
LIB
/
DESKLIB
/
CORE
/
DeskLib
/
Docs
/
Updates
< prev
Wrap
Text File
|
1995-09-03
|
48KB
|
1,278 lines
This file documents changes made between released versions of DeskLib.
DeskLib 2.30 (02 Sep 1995)
==========================
Overview of major changes since version 2.16
--------------------------------------------
New libraries: Debug, Dialog2, Filing, Font2, Menu2, Print, Pane2.
StrongHelp help manual '!DeskLib.DeskLib'. This needs version 2 of
StrongHelp.
Dynamic-linking version of DeskLib.
Everything is now in a 'DeskLib' directory. The distribution is in the
form of a set of zip files which contain different parts of the DeskLib
directory tree.
New 'DeskLib.!DLSources' directory containing DeskLib source code.
New 'DeskLib.!DLUser' directory for user's personnel DeskLib-style libraries.
Many new scripts and command-line commands, which are used to make the
process of rebuilding DeskLib more automated.
Normal and trimmed versions of the DeskLib header files - with a program
to generate the trimmed headers.
All headers now compatible with C++
New sublibraries
----------------
Debug A few standard function prototypes which reduce to nothing
unless 'DeskLib_DEBUG' is defined, allowing easy building of
normal and debug builds from the same source code.
See 'DeskLib.Docs.ModulENote.Debug'.
Dialog2 An alternative to the 'Dialog' library.
Filing Easy access to files information, directory scans and
filename handling.
Font2 This provides fonts which are automatically updated on mode
changes.
Menu2 Slightly higher-level support for menus. Uses the existing Menu_
functions.
Print Handles the wimp protocol for printing.
Pane2 Alternative to Pane. Takes care of Pane windows.
SmError an implementation of the Error_ functions for use with
command-line programs. Error messages are sent to stderr rather
than Wimp_ReportError.
Changes to existing sub-libraries
---------------------------------
Core Removed OSCLI (now in kernelSWIs).
Now includes <stddef.h> instead of #defining NULL 0.
Added various preprocessor statements for dynamic linking.
Error New macros:
error_FIXED,error_STATIC
These define compact os_error blocks.
error_global A global os_error.
error_PLACE Useful in diagnostic messages.
Removed #include "kernel.h"
Event Added typedef 'event_claimorreleasefn'.
Moved definition of 'event_taskname' into a separate file in the
Event sublibrary directory. This is so that using Error_
functions (which use event_taskname) in a non-wimp program
doesn't pull in the whole Event library.
File Changed OS_File to SWI_OS_File.
Added File_ReadExtent.
Added a few filetype #defines (MSX, RLE, COLORIX, FITS, HAWKV9,
REPLAY).
Filter Fixed bugs in Filter_RegisterPostFilter and
Filter_DeRegisterPostFilter.
Fixed prototype of Filter_DeRegisterPostFilter in
'DeskLib:Filter.h'.
Font Added Font_Paint3 - veneer for the RISC OS 3 Font_Paint3 SWI.
GFX Added macros GFX_Mode and GFX_SetOrigin.
Icon Small bug-fix in Icon.c.IncDec - caret is moved to end of
writable icon after each increment/decrement.
Icon_GetText now sets terminater in returned string rather
than the icon's buffer.
KernelSWIs
Added: OS_SWINumberToString
OS_SWINumberFromString
OS_GSTrans
osbyte_WRITEVDUDRIVERBANK
osbyte_WRITEDISPLAYHARDWAREBANK
Mem Many changes and bug-fixes.
Menu Small bug-fix for indirected menu-titles from Neil Tarrant.
Pane Fixed incorrect #defines of pane_HORIZ/VERT in Pane.h
Save Now #includes <stdlib.h> for size_t
Sprite Fixed a bug in Sprite_MemorySize - it now works properly with
'double pixel' modes.
Added Sprite_Select
Template
Now declares some globals used by Window_ModeChange.
Wimp Additions to message_action enum
message_FILER...
message_PRINTER...
message_PS...
Added Wimp_StartTask3
Wimp_GetWindowInfoNoIcons (for RO 3.10 or later)
Corrected the comments in window_flags about which window flags
are 'old-style'.
WimpSWIs
Added SDLS-compatible Wimp_Poll(Idle) veneers -
automatically used with SDLS clients.
Wimp_SpriteOp changed to use a simple array of 10 ints instead
of a _kernel_swi_regs. This is to remove the dependancy on
"kernel.h", allowing use with gcc.
Removed #include "kernel.h"
Window Added Window_GainCaret
Window_CreateOrig
Window_DeleteOrig
Window_ForceWholeRedraw
Window_MoveWindow
Changed Window_GetInfo3 to return an (os_error *).
Window / Template
Fixed a very hacky bit of code in the Window/Template
sublibraries - the 'TempDefs.h' was duplicated in the Windows
sublibrary.
DeskLib path variables
----------------------
C source code should continue to use '#include "DeskLib:Foo.h"' to load
the DeskLib header files.
There is now a '!DLUser' directory for user's own DeskLib libraries.
'DeskLib:' now resolves to 'DeskLib_User:,DeskLib_Core:', where
'DeskLib_Core:' is the !DeskLib directory and 'DeskLib_User:' is the
!DLUser directory. This means that you can write your own DeskLib
libraries but keep everything (even your header files) separate from the
main DeskLib directories. This should simplify things when new versions
of DeskLib are released.
New DeskLib documentation
-------------------------
Probably most useful is the StrongHelp manual for DeskLib. This is the
file '!DeskLib.DeskLib'. The help pages are generated automatically from
the DeskLib header files, so they document *every* DeskLib function, macro
and variable.
New files in 'DeskLib.Docs':
QuickRefs.MenuData breakdown of menu structures.
ModuleNote.
Debug
Dialog2
DynamLink.
SDLS_Apps Information on how to write and build programs
which use the dynamic-linking version of
DeskLib.
This is all you need to write DLL clients.
DLLChanges Detailed information on the changes made to
DeskLib to allow generation of normal/static
linking DeskLib.
RndDLLInfo Some more info about the DLL changes.
Example applications
--------------------
TestApp This has been changed so that DLL and debugging versions can be
made as well as the standard statically-linked one, from the
same source code.
New example programs:
Widget5 Andrew Sellor's excellent image processing program.
Pane2test Tests the new Pane2_ functions.
Dialog2EG Tests the new Dialog2_ functions.
New example source
Print Some source which uses the Print_ functions. This is from my
Shell library, and might give an idea of how to use Print.
There is now an EasyC version of !TestApp. Unfortunately I haven't had
time to make EasyC versions of the other example programs. If you use
EasyC, then any help in this area would be very welcome.
Source and makefiles
--------------------
Many of the source files have been altered to #include "DeskLib:Foo.h"
rather than "Foo.h". Also, all sources now #include their library's main
header file, to ensure consistency between declarations and definitions.
The makefiles all use cc -fh to check this sort of thing.
The DeskLib library makefiles now use 'cc -I,C:' instead of 'cc
-I,DeskLib:,C:', and they all have stricter compiler checking, such as
checking for unused variables, variables being used before they are set
etc.
Most .c files have been altered so they compile with no warnings (eg by
judicious use of UNUSED()), but there are some that still make cc give a
warning; there is a comment in the appropriate part of the source file
acknowledging this.
The exceptions to this are the Pane2 and Mem modules - I haven't had
time to understand and remove the offending code or put acknowledge
comments in.
General changes to header files
-------------------------------
The !DeskLib directory now contains two versions of the DeskLib header
files. The ones in '!DeskLib.h_doc' are the normal fully-commented ones
which should be read to find information about DeskLib functions, while
'!DeskLib.h' contains automatically-generated 'trimmed' versions, with
all C comments removed and some removal of excess white space.
The reason for doing this is that I got a bit fed-up with having AMU
recompile lots of source code after I'd made a minor change to a comment
in a header. This was particularly bad when working on 'DeskLib:Core.h'
which is included (indirectly) by every DeskLib .c file.
Using the trimmed headers also improves compilation times slightly.
The '!DLSources.Bin.CTrim' file is used to generate the trimmed
headers. The Obey file '!DeskLib.TrimHead' runs this on each of the
headers in the !DeskLib directory.
All headers are now (hopefully) C++ compatible (ie 'extern "C" {...}' is
used if __cplusplus is defined).
All DeskLib headers include other DeskLib headers with '#include
"xxx.h"' - some used to use '#include "DeskLib:xxx.h"' which doesn't
work with cc version 4 unless -I,C: is used.
All comments in the headers are now adjacent to their declarations so
that generation of the StrongHelp pages works better. Also added a few
short comments to many typedef structs in Wimp.h so that there are links
to other relevant struct in the StrongHelp pages.
None of the DeskLib headers use "kernel.h" now, so that DeskLib can
(hopefully) be used with gcc, as long as some stubs (eg gststubs) to the
Shared C Library are used (as apposed to UnixLib, which doesn't have the
_kernel_* functions AFAIK).
New organisation of source files etc
------------------------------------
There have been some changes to the directory structure of the DeskLib
source code directory. This is to accomodate the additional makefiles/.o
files needed to create a dynamically-linkable version of DeskLib.
All sources are now in a '!DLSources' application directory, which also
contains various scripts and template makefiles which are needed. The
'!DLSources.!Boot' file sets the system variable <DeskLib_Sources$Dir>
to be the !DLSources directory.
Makefiles in the individual DeskLib sublibrary directories are now
generated automatically from template makefiles in
'!DLSources.TemplateMF'.
The Obey files in '!DLSources.Scripts' do various things such as create
makefiles, run makefiles etc. See '!DLSources.!Help' for more
information.
In addition, there are some DeskLib-specific commands in
'!DLSources.Scripts.Commands' which can be used with a
'DeskLib_Commands:' prefix. They are: 'DeskLib_Commands:EachDLL' and
'DeskLib_Commands:EachStatic'. These are similar to 'Every', except they
run the given command on every DLL/~DLL DeskLib sublibrary, by looking
for the presence/absence of the 'IsDLL' file.
'!DLSources.Bin' is added to your Run$Path by 'DLSources.!Boot' using
'DeskLib_Run:'. It contains various utilities which are used by some of
the scripts in '!DLSources.Scripts'. These utilities provide usage
information if run with no parameters. They are:
Makatic Makes makefiles for a directory by adding a list of .o
files to the start of a template makefile.
CTrim Strips comments and excess white space from C source
code. The output file is only overwritten if it differs
from an existing trimmed file, thus preserving the
timestamp when possible.
Every Performs a command on every dir and/or file in a
directory. Can also act recursively.
There is a zero-length 'IsDLL' file in each sublibrary directory which
can be made into a DLL, which is checked by the EachDLL/Static programs.
Dynamic Linking
---------------
DeskLib now comes as a normal library ('!DeskLib.o.DeskLib'), and also
as a set of Dynamically Linkable Libraries (DLLs, in
'!DeskLib.!DLLs.Freeware_1.DeskLib.') and a library of Stubs files
('!DeskLib:o.DLLClient') which use the Straylight Dynamic Linking System
(SDLS) to allow applications to share DeskLib code.
(There is actually a third version of DeskLib which is used when making
DeskLib DLLs, '!DeskLib.o.DLLDLL').
See 'Docs.DynamLink.SDLS_Apps' for complete information on how to make
an existing application use the DLL version of DeskLib.
See 'Docs.DynamLink.DLLchanges' to find out about the various new macros
which are set in DeskLib headers to allow compilation for normal, client
and DLL programs.
See 'Docs.DynamLink.RndDLLInfo' for extra snippetts of info about the
DLL DeskLib.
Various #ifdef stuff has been added to various headers to give different
compiles for DLL clients or DLL libraries. These changes are needed to
make global variables work transparently under the SDLS.
A few changes have been made to various libraries to support global
variables properly under the SDLS. These changes are basically to add a
veneer function which returns the address of each global variable
supported by the sub-library. These functions are only compiled when a
DLL-version of a library is being made.
Please note that using DeskLib for normal (static) linking is completely
unaffected by the presence of the DLL stuff, because of the use of
various macros and #ifdef/#ifndef in the DeskLib headers and source
files.
2.16 (Apr 1995) --------------------------------------------------------------
Put in the contact addresses for the new moderators, Julian Smith and
Craig Beech.
2.15 (Apr 1995) --------------------------------------------------------------
AMENDED
WimpSWIs
Wimp_ProcessKey fixed - in 2.14 it went into an infinte loop
2.14 (January 1995) ----------------------------------------------------------
AMENDED
File
File_Size now returns zero if the file does not exist
Kbd
Kbd_Keydown() now uses return value from r1 instead of r2; this doesn't
affect its normal use ('negative INKEY'), but allows it to be used to scan
for a range of keys with 0 < R1 < 128.
Mem
Fixed a bug where the heap could be corrupted when merging blocks as
stuff was freed.
Menu
NewMenu can now cope (under RO3.10 onwards) with indirected titles, so
you may now pass in strings longer than 12 chars to this method.
RemoveItem has been upgraded to handle menus including indirected titles
(thanks for that marvellous bodge, Acorn)
Wimp.h
Added some RISC OS 3 flag bits to the window and menu flags
Added iconization protocol message structures
ADDED
Icon
Icon_WhichRadioInESG - much the same as WhichRadio, but the icons to
scan are specified with an ESG value rather than a range of icon handles
Icon_ButtonIsHeld - returns TRUE if a mouse button is down.
Menu
Added functions to provide a menu of available fonts.
Menu_MakeIndirected - Makes a menu item indirected
Menu_ReviseWidth - Re-scans the menu and sets its width to accomodate
the text of the title and all items (use after SetText or MakeIndirected)
Menu_FullDispose - Disposes of a menu, including indirected data (but does
not dispose recursively of attached submenus)
Menu_PopUp and PopUpAuto - for showing a popup menu to the right of
a given icon.
Resource
resource_sprites now point at your global sprite resources. This defaults
to the WIMP sprite pool, but can be set to local resources by using the
new Resource_LoadSprites call.
Templates
Template_LinkSpriteArea - Links a given template to a given sprite area
Window
Window_ForceRedraw - a veneer for force redrawing part of a window
Window_SetExtent - sets the window extent, and re-opens it if necessary
to make the window screen appearance update
Window_GetCoords - a simple means to fill in the coords_convertblock
for a given window
2.12 (October 1994 - unreleased) ---------------------------------------------
AMENDED
Headers
Several headers have had tiny changes applied to be compatible with
c++ compilation - mainly replacement of reserved words such as new,
delete, template, etc.
Headers changed are: Filter, PDriver, WimpSWIs
Str
Str.s.strcatcr rewritten. Now more efficient, and works properly.
Sprite
Bug in WimpPlot fixed (was using 16 bytes at a random address, rather
than on the stack, for workspace!)
Time
MonoTime made marginally more efficient (STM/LDM -> MOV)
WAssert.h
Fixed the comments slightly. Now defines the assert macro if _DEBUG
is *defined*, as it should, rather than when it is not defined!
assert() Macro corrected.
Wimp
Renamed all the object files to useful names
Veneers that used to stack r14 only over the SWI call now save it in
the ip register; this replaces 2 LDM instructions with MOVs - marginally
more efficient.
ADDED
EventMsg
Fixed the EventMsg dispatcher so that message handlers may deregister
themselves during handling of a message without causing the message
dispatcher list scanner to jump immediately into hyperspace.
File
Added the File_GetType code which was accidentally missed out last time
Icon
Added IncDec.c which provides two new functions, Icon_InitIncDecHandler
and Icon_ReleaseIncDecHandler. These attach automatic Event_ handlers
which change the integer value of a writable icon whenever left/right
or up/down bump icons are clicked. See Icon.h and Examples.!IncDec
Added AlterValidation function - this allows you to write a new string
over the existing validation string; useful for changing border types
and suchlike
Pointer
Added 4 routines to restrict the mouse pointer to a rectangle, a window,
and an icon, and to 'free' such a captured pointer again.
Examples.!TestApp now restricts the pointer while the hourglass is going
The hourglass now runs for 2 seconds rather than 1 in order to make it
easier to detect the restriction by waggling the mouse around.
Sprite
Added Sprite_LoadFiles function, which uses varargs to allow you to
load multiple sprite files in one go
Window
Window_ConstrainMouse - to constrain the mouse pointer within a window
(a convenient macro for a Pointer_ call)
REMOVED
Examples.Pane was old code, incompatible with version 1.02 of the Pane
sublibrary. This has been removed.
2.11 (August 1994) -----------------------------------------------------------
AMENDED
File
** Changed all FILETYPE_ definitions to filetype_ for consistency
File_Exists now reads the object type of the file to determine if it
exists, rather than just attempting to open it.
File_Size now uses OS_File 17 rather than 13
Icon
Icon_FileIcon filename formatting string amended
Save
Sublibrary significantly improved and bugfixed- see Save.h and Save.c
Sprite
SpriteOps 43 (ReadMask) and 47 (FlipY) calculated the SpriteOp reason
code incorrectly (SUB instead of ADD?!)
SpriteOps 52 (PlotScaled) and 62 (ReadSaveAreaSize) corrected
Str
Renamed 'LeafName' to 'Str_LeafName'. For backwards compatibility,
there is '#define LeafName Str_LeafName'.
Str_LeafName now also recognises ':' as a leafname separator, so it now
works on paths (e.g. "MyPath:Templates" now returns the leaf properly)
Wimp
Now contains a definition for message_dataloadack (identical to dataload)
icon_indsprite now uses a (void *) as its sprite area pointer rather than
an (int *). It should use sprite_area, but (void *) was chosen to avoid
a dependency upon the sprite header (Wimp takes long enough to parse as
it is)
ADDED
Clear
This new sublibrary provides base functions for handling Clear files
File
Added prototype for existing File_Date function
New File_printf function
Handler
New function Handler_Key to return unwanted keypresses to the Wimp
KernelSWIs
Added OS_ReadModeVariable veneer
2.10 (June 1994) -------------------------------------------------------------
MOVED
I've moved !TestApp into the new Examples directory
AMENDED
My contact addresses mysteriously changed, coincidentally at the same time
as I moved to England and started working at Computer Concepts.
See the end of 'AboutDL' for my new addresses.
Doc.Blanks.Makefile
Updated this for the new make system (I missed it the last time around)
Core
BOOL is now an unsigned rather than signed int, to allow 1-bit BOOL
bitfields.
Coord
Changed to new help-comment format comments
Dialog
A couple of bugfixes to the dialogue code
Event
Fixed bug in NULL event handling (NULL events were not included in
event_ANY claims, but were in included in event_ANY releases, so were
often disabled when they should not have been).
event_ANY now definitely does NOT include NULL events, 'cos they're special
**** IMPORTANT ****
Claims of events for any window (with event_ANY) are now added to the
HEAD of the event list rather than the TAIL. This means that you can add
a temporary event OVERRIDE to a window - the old system meant that you
could only intercept events that were not otherwise already processed
by the window.
File
Fixed File_Delete (to save registers v1, v2 over the SWI call)
Icon
Icon_GetText has been slightly modified so it won't blow up if you have
an indirected icon which does not contain text or a sprite. It now also
terminates the string at the first control character discovered, rather
than expecting the string to be zero terminated
Icon_SetText, Icon_printf, Icon_SetTextRJ, Icon_SetInteger, Icon_SetDouble
now all ensure that when setting the text in an icon containing the caret,
the caret is not left in the wrong place
Handler
Minor change (all functions now include handler.h)
Misc
All strong handling functions have moved to the new 'Str' sublibrary
Mem
Mem_MidExtend now returns TRUE if you ask it to extend by 0 bytes, so
you shouldn't have to special-case this case any more.
Several serious bugs ironed out of Mem_Compact
Menu
Small changes to NewMenu.c to calculate MenuWidths better, and not
indirect menu items if they are exactly 12 characters long.
StringCR.h
All definitions from this file are now in the new 'Str.h' header.
StringCR.h remains for backwards compatability.
Template
Fixed rampant bug in template ClearAll and Delete (trying to free memory
that wasn't malloc'd!)
ClearAll also now releases any fonts that were in use by the discarded
templates.
Template loading now truly appends templates to the current list rather
than destroying the old list.
Window
Window.h now includes a prototype for Window_BringToFront
Added open_CENTEREDUNDERPOINTER open mode for Window_Show
Window_Delete now also releases all EventMsg claims
Window_Create now returns 0 if it fails
ADDED
Added Erik de Kort's small OpenDirH program to !DeskLib, so now double-
clicking !DeskLib opens the headers without obscuring the icon bar.
(RISC OS 3 only. If you haven't got RO3, upgrade)
Added Docs.HelpCommnt and Blanks.HelpCommnt.*
This describes how to generate machine-readable comments in your sources
that can be compiled with Tim Browse's up-coming help compiler. The help
will then become an on-line hyperlinked database (StrongHelp or WordWorks
HyperView) rather than scrappy bits of text spread over hundreds of
header files.
ColourTrans
Added veneer for ColourNumberForMode SWI
Coord
Added RectUnion
Core.h
Added UNUSED_ARG, MIN, MAX, and OSCLI macros
Dialog
Addition of Hide and ShowAt functions
Drag sublibrary
This simplifies dragging by providing a central handler system, into which
you can plug handlers specific to each drag when the drag is started.
These handlers are automatically discarded when the drag completes.
This addition includes the Event handlers DragNULL & DragFinish, and
the stuff in the Drag sublibrary (Drag_Initialise, Drag_SetHandlers)
See Drag.h for details.
File
Added File_Date and File_SetType
GFX
Added GFX_GCOL macro
Handler_HatchRedraw.
This redraws a hatch pattern across a window. Useful when developing a
program but haven't written a redraw handler, so you can see that
something is happening.
Hourglass
The hourglass swi veneer macros (in hourglass.h) have now been replaced
by proper SWI veneer functions.
Icon
Icon.SetCol, two small functions to set the foreground and background
colours of a (non-outline-font) icon.
Icon_SetTextRJ; similar to SetText, but right-justifies the text in the
icon string buffer (i.e. if the string is too long, it is truncated at
the beginning rather than at the end)
Addition of the following code files by Tim Browse:
BarIconUse
FileIcon
GetBgCol
GetFgCol
GetTextPtr
ScreenPos
SelectGroup
ShadeGroup
Kbd
Added GetModifiers function, which reads the up/down state of modifier
keys (Alt, Ctrl, Shift)
KernelSWIs
Added this sublibrary, which provides veneers for OS_Byte and OS_Word
Mem
Added Mem.CheckHeap, a function for debugging which checks the
integrity of the heap.
Menu
Menu.GetText: A function that returns a pointer to a menu item text buffer
Menu.GetFlags: A function to read a menu item's flags
Menu.Warn: A function that registers a message_MENUWARN handler with
EventMsg, and sets a menu item's flags to make it produce such a message.
Menu.RemItem: A function to remove an item from an existing menu structure
Module
A new sublibrary supporting the OS_Module SWI.
Currently provides OS_Module Claim and Free functions
PDriver
PDriver.h now has a more constants defined, tidier comments, & RO3 support
Save
A save-as window handler sublibrary
Serial
Veneers and handlers for accessing the serial port - see Serial.h
Sprite
A whole heap of new veneers, plus Sprite_LoadFile
Str
New String sublibrary. This includes all the 'StringCR' stuff, plus
some new ANSI-like string handlers, plue LeafName (returns the leaf
name from a full RISC OS pathname string) and other functions such
as decoding hexadecimal strings, etc. See Str.h for details.
Template
Added Template_UseSprites function; Call this before using templates
to make them use sprites from a user sprite area instead of the
WIMP sprite pool
Time
Added SWI veneers for time conversions ConvertDateAndTime and
ConvertStandardDateAndTime.
WAssert
A new sublibrary providing a WIMP (Wimp_ReportError) based assertion
system (Used while developing a program to check if certain conditions
that should be met in your code actually ARE being met in your code).
See WAssert.h for details of its use.
Wimp
Added mouse button value constants (button_SELECT etc) to Wimp.h
2.05 (inadvertently released ?) ----------------------------------------------
ADDED
Kbd
Kbd_GET, an OS_ReadC veneer, similar to BASIC's GET command - returns the
ASCII code of the next keypress in the keyboard buffer (or waits for
the user to press a key if the buffer is empty)
AMENDED
DragASprite
DragASprite_DragIcon now works properly under RISC OS 2 as well as 3.
It turned out the parent bounding box maximum was being set to &FFFFFFFF
(-1) instead of &7fffffff (the maximum possible positive integer).
Under RO3 this didn't matter, but RO2 then put the drag box offscreen
(i.e. it worked fine except the dragbox was 'invisble'!
PDriver.h
The prototype for EnumerateJobs was missing its argument!
Window
Window.c.ParentName fixed (was copying only 8 characters of the name
instead of 12 (wimp_MAXNAME)).
2.04 (July 1993) -------------------------------------------------------------
Updated the !DeskLib !Run file - now uses Filer_CloseDir on the header dir.
before trying to open it, so that it is now never lost off-screen.
Added Wimp_ReportErrorR, which returns the flags to you indicating which
button (OK/Cancel) on the Wimp_ReportError dialogue was clicked by the user.
(source in WimpSWIs.s.Wimp40R). See WimpSWIs.h
Added Wimp_Poll3 and Wimp_PollIdle3.
2.03 (July 1993) -------------------------------------------------------------
Important - Please note that Event_ and Wimp.h now support more RISC OS 3
functionality. Specifically, Wimp_Initialise has a new parameter (message
list) on the end - to re-link with this version of the library, you will need
to upgrade any Wimp_Initialise calls in your code (add a NULL onto the end of
the list of parameters to Wimp_Initialise). You can of course take this
opportunity to upgrade your code to use the new features the RISC OS 3
makes available. Note that you'll also need to use LibFile to re-make the
WimpLib if you use it separately.
Along similar lines, you can now call Event_Initialise3() in place of
Event_Initialise to do a proper RISC OS 3 Wimp_Initialise, passing in a
list of accepted messages, etc. Event_Initialise provides the same (RISC OS 2)
functionality as before.
MISCELLANEOUS modifications
Modified the Libraries.!MakeDLib obey file. Each sublibrary is now compiled
by invoking an alias 'DLibMake', which makes the file shorter and more
readable, and also allows you to more easily modify the way in which
sublibraries are compiled.
Modified the Clean obey files - they now won't abort if a file is missing.
Modified the Makefiles to make everything tidier.
Now, in the obey file Libraries.!MakeDLib, you can set 3 amu variables:
x_cflags - c compiler extra flags
x_aflags - objasm extra flags
do - What to do to create the sublibrary
This allows you to do some important things:
x_cflags=-Ff
This is the new default, which reduces the library code size by about 5%.
However, when debugging, you may like to recompile the library with the
'f' removed, so that you can find the names of the functions being
called as you debug.
do="Create $@ 1"
This will minimise disc space used by the library (by creating 1-byte
'sublibraries' instead of compiling them properly - the file is needed
so amu knows the sublibrary is up to date)
do="LibFile -c -o $@ @.o.*"
This will create each sublibrary - you can then use the sublibrary files
to link with instead of the main DeskLib library (eg WimpLib is quite
handy on its own, and is only 18kB rather than DeskLib's >100kB, a very
useful thing if you're developing of floppies!)
Updated the TestApp- now does the following extra things:
* Uses outline fonts, and gets them right if you change screen modes
* Changes the window title if you click the menu item 'Change title'
when you brought the menu up from a window (else that item is shaded)
BUGS which have been fixed:
Font
Fixed a major set of bugs due to a small and harmless-looking typo in the
Font sublibrary - most of the font calls would return a non-zero value
if no error occurred, and a zero value if an error occurred (i.e. the
opposite of what they should have been doing: MOVVS r0, #0 instead of
MOVVC r0, #0)
This affects most font calls, but you'll only notice a difference if you
check the returned error - the SWIs worked fine, but returned incorrect
error-return-values - all other return values were unaffected.
ColourTrans, DragASprite
Similar problems were also removed from the assembler veneers for the
ColourTrans, DragASprite, and PopUp sublibraries - namely that the return
values were not consistent with the definitions given in the headers.
I'll keep a closer eye on this in future!
Icon
Icon_BarIcon, Icon_GetText, Icon_Set(Integer/Double/Text), Icon_printf
previously did not correctly terminate strings correctly if they were too
long to fit in the icon.
Icon_BarIcon now uses sprite_MAXNAME rather than wimp_MAXNAME for copying
the sprite name (though these constants are both 12, so there is no
effective difference)
Menu
No longer trashes your machine with indirected menu items (Menu_New)
PopUps
'bugs' removed from the PopUp.h header file's example code segments
SWI veneers fixed up - they didn't quite correspond to the prototypes
given in the headers.
Template_Clone
Now terminates copied strings properly.
MODIFICATIONS
Error
Upgraded OtherSrc.c.Error and Error.h to new code submitted by P.Colmer.
Now Error_Report and Error_ReportFatal (and "Internal" versions of these)
take variable arguments - they can still be used exactly as before, but
you can now include any 'printf' style arguments to save having to
pre-assemble a string to pass in.
Event
Upgraded Event_Initialise to call the new function Event_Initialise3
with a required WIMP version of 200 (RISC OS 2 WIMP), to add support
for RISC OS 3, and the new non-zero-pollword events.
Resource
This has now been moved from Misc to its own (Resource) sublibrary.
Also added replacement call for Resource_Initialise,
Resource_InitialisePath, which allows you to use DeskLib functions
to load Templates, messages, etc. from a path ("AppName:Templates")
rather than a directory ("<AppName$Dir>.Templates") - useful for adding
support for internationalisation.
Template
Added support into Template_Clone for a new 'maxtitlesize' value of
template_TITLEMIN (-1) which will allocate as much room for the title
as declared in the template definition.
Added support for outline fonts into Template loading.
(See the end of Template.h for details of the new calls)
Template, Handler, Window
Added code to fix any windows/templates you are using which contain icons
using outline fonts whenever a mode change necessitates it (On some mode
changes outline fonts will otherwise become the wrong size as the font
manager doesn't re-cache them).
This functionality required addition of:
Font.c.LoseAll Lose all fonts in a Template_Load style font
usage array
Handler.c.ModeChange Replacement for old ModeChange handler - does the
same as before, but if you are using outline fonts
(you have called Template_UseOutlineFonts()) it
fixes all your fonts if necessary. Note that this
only works on templates loaded with Template_ calls
and windows opened with Window_ calls.
Template.c.UseOutFont Function to call BEFORE Template_LoadFile to set up
a font usage array and exit-handler to lose any fonts
you were using.
Window.c.ModeChange Function to call to fix outline fonts in all windows
and templates. Called by Handler_ModeChange()
Appropriate changes have been made to the relevant header files.
Wimp SWI veneers
WimpSWIs.s.Wimp01 (Wimp_Initialise) has now been modified to support
the new RISC OS 3 parameter (the message list). This call is still
RISC OS 2 compatible, but those of you calling Wimp_Initialise directly
will need to add a NULL onto the end of your initialise call, e.g.
Wimp_Initialise(&version, "MyTask", &taskhandle);
will become:
Wimp_Initialise(&version, "MyTask", &taskhandle, NULL);
Window
As well as the additions mentioned in the bit above,
changes have also been made to the internal window information structure
as used by the Window.c files. (The window template name is now
WIMP_MAXNAME+1 characters long (13) rather than 9 characters long)
ADDITIONS
Event
Added Event_Initialise3() to Event.c.Event. This more or less replaces
Event_Initialise with a new call that will initialise the RISC OS 3 WIMP
and allow you to pass in the list of desired messages. You should not use
Event_Initialise with WIMP version numbers greater than 200 - use
Initialise3 instead. [If you desire RISC OS 2 compatability, you MUST
call Event_Initialise]
This also allows the support for non-zero pollword events now available
under RISC OS 3. Thanks to P.Colmer.
File
Added File sublibrary, which gives calls for opening, closing, reading and
writing (bytes, words, words with endian-conversion, chunks),
getting/setting the file position, and misc operations (reading file size,
deleting a file, checking if a file exists). These are all veneers for
OS_File/GBPB/BGet SWIs, and may be preferable to stdio functions in some
circumstances, as they are faster than stdio calls, and also are easier
to use in conjunction with other systems that work with RISC OS file
handles (rather than C's (FILE *))
Added some test code for File_ calls to TestApp. This test code can be
found in "!TestApp.Test c" - you can add it back into the test app if you
feel keen to try it out! It also might be of use as an example of use of
the file calls, though they're pretty simple!
GFX
Added GFX_VDU (and alias VDU), an OS_WriteC veneer
Mem
Added Mem_MoveAnchor, which allows you to move the anchor for a memory
chunk into another variable. Very convenient in some circumstances
(i.e. I had an anchor in an array, and wanted to allocate a new chunk,
and some time later replace the old chunk with it in the array - this is
now possible by simply moving the anchors for the two blocks into new
storage locations as appropriate)
PopUps
Added Docs.ModuleNote.PopUps which gives a bit more help and example code
on using PopUp windows from DeskLib C code.
Sprite
Added 3 new Sprite functions - a veneer for SpriteOp 62 (read save area
size) and functions to return the size (in bytes) of a sprite, given its
vital parameters, and the size of a sprite needed to fill a window's icon.
Thanks to Tom Kirby-Green for this submission.
Wimp.h
Wimp.h has been upgraded: icon_flags now include a third struct in
the union which allows you to directly access the font handle with
icon.font.handle instead of having to mask it out of icon.value
Wimp.h now has extra support for RISC OS 3, relating mainly to wimp
pollwords and non-zero pollword events. Some new event mask bit
definitions have been added.
Window
Added Window.c.SetTitle, which allows you to set the text of a window title
and update the correct bit of the screen, even when using odd sized
toolsprites, etc. (And better than win_settitle because it doesn't crash if
the icon is non-indirected, it bothers to terminate the string if it had
to truncate it to make it fit, and it doesn't try to force redraw part of
the screen if the window isn't actually OPEN!)
Also added Window_ModeChange, as described above (Modifications to
Template)
2.01 (May 1993) --------------------------------------------------------------
Apologies to all DeskLib users out there for the long (1 year) delay between
releases, and for all the bugs and missing bits in the library. This delay
was caused by my thesis and other things taking too much of my time. I hope
that I will be able to continue DeskLib updates at a more reasonable pace
in the future... I have jumped from version 1.04 to version 2.00 to reflect
the reasonably large update, to stress the newness of this version, and
to make you feel as if something must have been done between this and the
last release! ;-)
Note that although DeskLib is now supporting RISC OS 3 functions, it is still
RISC OS 2 compatible. Also, some things (such as Wimp_Initialise under RISC
OS 3) have not yet been implemented, mainly due to a total lack of any
documentation on the subject. This will hopefully change for the better in
the not too distant future...)
Apologies to anyone who needs to adjust their code because of changes to the
library headers. These changes were deemed necessary for one or more of the
following reasons in each case:
* To make it work!
* To remove unnecessary incompatabilities with compilers other than Desktop C
* (as a side effect) To improve consistency/readability
You can, of course, stick with the old definitions in the headers if you
prefer them. Most people I know have their own random perturbations of the
original header files anyway!
Additions
Added sublibraries:
ColTrans Assembler interfaces to 4 ColourTrans SWIs
DragASpr 3 Routines for using DragASprite
I especially direct your attention to
DragASprite_DragIcon() which is excellent!
(c.f. macro "Icon_StartSolidDrag" defined in icon.h)
Filter Assembler interfaces to RISC OS 3 FilterManager SWIs
Font Assembler interfaces to 23 Font SWIs
Kbd Assembler function to check if a key (e.g SHIFT, CTRL)
is currently depressed. (No function yet to cheer it
up if it is, though ;-)
Menu Simple menu creation and manipulation functions along
similar lines to those in RISC OS lib. (A proper menu
template system is planned in conjunction with Glazier
for the future, but I needed to fill this gap NOW!)
Mem 'flex'-like dynamic memory manager for multitasking
applications. However, 'better' than flex, as it
compacts its heap much more efficiently than the
equivalent operation from flex (you call the Mem_Compact
function just before Wimp_Poll). It also guarantees
that blocks will not move around to a much higher degree
than flex does, giving you more freedom.
Sound Routine to sound a system beep (VDU 7!)
Added functions to:
GFX Added GFX_Write0() and GFX_WriteN()
Icon Added Icon_SetSelect(), Icon_SetShade(), and
Icon_DisposeIndData()
Misc Added Dispatch(), a generic function dispatcher, and
new stringcr functions (strcmpcr, strcatcr, strcpycr)
Sprite Added 6 new SWI veneers
Added more definitions to:
KeyCodes.h
Subtractions
The REDRAW (3-d icon border redraw) code has been discontinued because:
a) RISC OS 3.10 includes this feature for you, and
b) DeskLib actively supports RISC OS 3.10 onwards and no longer has
any sympathy for people without it! (though all non-RISC-OS-3
specific portions of it still work fine with RO2, this cannot be
guaranteed for the future)
For this reason, Icon_Select3d, Icon_Deselect3d, and Handler_Redraw3d
have also been removed.
If you have code which uses any of the above, then either copy them
forward from your old DeskLib or convert your program to use RISC OS
3.10 borders!
BugFixes/Modifications
Generally:
Touched up the docs. PLEASE NOTE my change of email address!
Rewrote all the makefiles. Now much smaller, tidier, and easier to both
understand and maintain, as well as more informative during Makes.
Redirected LibFile through a 'via' file (!Objects).
(It's wonderful what you can find out by reading the manual ;-)
Moved "Template.c.strlencr" to "Misc.c.strlencr" (see strlencr.h, below)
Slightly improved some of the Docs and quickrefs.
Coord:
Fixed some stunningly obvious and totally wrong prototypes and
#defines in Coord.h, particularly the Coord_YTo... macros.
GFX:
Most GFX commands have been converted to more efficient assembler
versions. The header reflects slight changes (e.g. GFX calls now no
longer return os_errors).
Fixed a harmless bug in GFX_CLG.
Made some GFX macros in GFX.h a bit nicer to read
Fixed GFX_Circle and GFX_CircleFill (used to use x+r instead of r!)
Handler.ClickOK.c:
Now doesn't do anything if icon clicked with MENU.
Icon:
BarIcon.c fixed to take icon size from the sprite correctly
Macro Icon_StartSolidDrag added as an alias for DragASprite_DragIcon
SetDouble modified to correctly fill in the right number of decimal
places.
SetCaret will now refuse to place the caret into a shaded icon.
LinkList.h:
InitItem macros added - now use Init() to init an anchor and InitItem()
to init an item, which will make it easier to replace the workings of
the list manager seamlessly.
Also modified these macros so that they will function corrrectly in the
following code:
if (whatever)
LinkList_InitItem(blah);
Redefined LinkList_{Next|Previous}Item() to make them nicer to use -
instead of using LinkList_NextItem(&thing.header), you can now use
LinkList_NextItem(&thing); (note that both syntaxes are fine now)
The Makefile for ListLib now also includes ListLength.c
Misc Resource.c:
Now adds terminator to string after strncat to ensure that the string
is terminated if you supply too long a name.
**** Important
strlencr has been moved into the Misc sublibrary.
strlencr() has been modified to make it functionally equivalent to
the ANSI function strlen() - that is, it now returns a value 1 LESS
than it did under 1.04 (i.e. it doesn't include the terminator any more)
All routines within DeskLib which use this function have been modified
accordingly.
Sprite:
Sprite.h tidied up, and parameter types slightly modified. 'sprite' and
'sprite_area' pointer typedefs fixed (previously used old names for the
definitions, so were totally incorrect)
strlencr.h
This has been renamed to 'stringcr.h', and now includes more than one
cr-terminated string handling function. (Correspondingly, a slight
modification of Template.h.TemplDefs to #include this new header)
Wimp.h:
window_ICONBAR changed from -1 to -2
message_destinee changed to a 'typedef int' instead of a union
window_block structure used to use shorts for minwidth and minheight.
This has been changed to minsize.x and minsize.y (both for consistency
and compatability with the Risc Developments compiler)
window_flags structure modified to use the normal DeskLib form for
flag-words (flag.value plus flag.data.*)
iconvalid_BORDERTYPE changed from 'B' to 'R' (RISC OS 3, 3.10 onwards)
Added definitions for message_WINDOWINFO (used for iconisation)
and message_MENUSDELETED (warning when a menu is closed)
Added windowcol_XXXX defines to make accessing a window's colours
easier (i.e. window->colour[windowcol_WORKBACK] = colour_RED)
Added colour_TRANSPARENT (= 255)
Added message_menuwarn structure definition
WimpSWIS:
Several function prototypes changed. Some were prototyped as accepting
a union which contained either a data set or a 'value' int. Unfortunately
the compiler baulks at this, so these have been changed to 'int's. This
now means that you need to pass in 'whatever.value' to these functions.
Added Wimp_CommandWindow prototype, which somehow got missed out
last time!
Wimp_DeleteWindow fixed (now actually deletes the window! Wow!)
Window:
GetInfo.c: '&block' changed to '&block[0]'
Show.c: Showing a window with open_NEARLAST now modified to open
the very first such window centered. Also, only windows
opened with NEARLAST will now affect the position of
succeeding NEARLAST windows.
Template.Clone.c
Modified to use the new form of strlencr()
1.04 31/05/92 ----------------------------------------------------------------
BugFixes/Modifications:
A minus changed to a plus in Coord_Convert routine (should now work!)
Extra fields added to the menu_flagword struct
Incorrect definitions of message_Data(Load/Save/SaveAck) fixed
-replaced incorrect "wimp_box" with "wimp_point"